<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>填写与核对订单</title>

    <link rel="stylesheet" href="css/order.ordersubmit.css">

    <script src="https://cdn.jsdelivr.net/npm/vue"></script>
    <link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="external nofollow" target="_blank"  rel="stylesheet">

    <script src="http://libs.baidu.com/jquery/1.10.2/jquery.min.js" rel="external nofollow" ></script>


    <script src="https://cdn.jsdelivr.net/npm/vue"></script>


</head>
<body style="position: static">
<div class="a4" id="">
    <div class="a1 a3 a4">
        <img src="img/a3.png">
    </div>
    <div class="right a7">
        <img src="img/a2.png">
    </div>
    <div id="app" class="bgGray ">

        <div class="orderMsg clear">

            <div class="orderMsgs">
                <div class="orderMsgL left a6">
                    <img :src="infos.img">
                    <p></p>

                </div>

            <div class="costCom left  a5  center_text">
                <h3>费用明细</h3>
                <div class="item">
                    <span class="left" >保险种类</span>
                    <span class="right">{{infos.pname}}</span>
                </div>
                <div class="item">
                    <span class="left" >保险描述</span>
                    <span class="right">{{infos.desc}}</span>
                </div>
                <div class="item">
                    <span class="left" >基本保费</span>
                    <span class="right">{{infos.price}}</span>
                </div>

                <div class="item">
                    <span class="left" >手续费（35元/单</span>
                    <span class="right">35元</span>
                </div>
                <div class="item">
                    <span class="left" >基本保障服务</span>
                    <span class="right">50元</span>
                </div>
                <div class="payMony">
                    <label class="right">应付金额&nbsp;
                        <span id="total">{{current()}}</span></label>
                </div>

                <button class="buttons right" id="butt" onclick="submitorder()">
                    提交保单
                </button>




            </div>




        </div>

    </div>
</div>
</div>

<script type="text/javascript">
    var vm = new Vue({
        el:'#app',
        data:{
            infos:'',
            getcitys : '',
            backcitys: ''
        },

        methods:{
            current:function (){
                var total = 0;
                var money = 85;
                total = this.infos.price + money;
                return total;
            }
        }
    });

</script>
<script type="text/javascript">
    $(function(){
        var getid = window.location.search;
        var id=1;
        $.ajax({
            type:"get",
            url:"api/iProduct/IProduct.selectById.do",
            dataType: "json",
            data: {
                id: "1"
            },
            success:function(data){
                if(data.code==1) {
                    vm.infos = data.data;
                }
            },
            error : function(){
                alert("ajax加载失败");
            }

        })
    })

</script>


<script type="text/javascript">

    function submitorder() {
        var id = window.location.search;

        var total = $("#total").html();
        $.ajax({
            type:"post",
            url:"api/iOrder/IOrder.save.do"+ id,
            dataType: "json",
            success:function(data){

                window.location.href="c.html?p="+85;

            },
            error : function(){
                alert("ajax加载失败");
            }

        })
    }

</script>

</body>
</html>